// 统一请求路径前缀在libs/axios.js中修改
import { getRequest, postRequest, putRequest, deleteRequest } from '@/libs/axios'

//参与活动数据
export const getJoinActivityList = (params) => {
  return getRequest(`/activity/join`, params)
}
//获取活动管理数据
export const getActivityList = (params) => {
  return getRequest(`/activity/list`, params)
}
//获取商品数据
export const getGoodsList = (params) => {
  return getRequest(`/goods/storeId`, params)
}
// 参与商品活动
export const joinActivity = (params) => {
  return postRequest("/activity/save/join", params)
}
// 修改参与商品活动
export const editJoinActivity = (params) => {
  return putRequest("/activity/edit/join", params)
}
// 新建活动
export const addActivity = (params) => {
  return postRequest("/activity/save", params)
}
// 删除商品活动
export const delActivity = (ids, params) => {
  return deleteRequest(`/activity/${ids}`, params)
}
// 编辑商品活动/修改参与商品
export const editActivity = (id, params) => {
  return putRequest(`/activity/${id} `, params)
}

//获取活动详情
export const activityDetail = (id, params) => {
  return getRequest(`/activity/${id} `, params)
}
//获取活动审核意见
export const getApprovalOpinion = (params) => {
  return getRequest(`/activity/examine/activityId`, params)
}
//获取活动商品信息
export const getGoodsInfo = (params) => {
  return getRequest(`/activity/goods`, params)
}
// 获取商品上级分类
export const getCategoryList = (params) => {
  return getRequest(`/goods/label/get`, params)
}
// //获取商品活动审核数据
// export const getActivityAudit = (params) => {
//   return getRequest(`/activity/status`, params)
// }
// //提交审核
// export const submitAudit = (params) => {
//   return putRequest(`/activity/examine/status`, params)
// }